import _ from "lodash";
import * as types from "./mutation-types";

export const settingEditAddItem = function ({commit,state},item) {
   commit(types.PUSH_SETTING_SELECTEDLIST,item);
};

export const settingEditReduceItem = function ({commit,state},itemId) {
  commit(types.DELETE_SETTING_SELECTEDLIST,itemId)
};

export const settingUserData = function ({commit,state},infor) {
  commit(types.SET_USER_NAME,infor.name || infor.mobile);
  commit(types.SET_USER_ICON,infor.headimg || '');
  commit(types.SET_USER_PHONE,infor.mobile);
  commit(types.SET_USER_ISAGENCY,infor.isAgency);
  commit(types.SET_USER_ID,infor.id);
};
